#!/bin/bash

source prepareEnv.sh

#echo "remove \$\{project.baseidr\}"
#rm -rf ./\$\{project.basedir\}/
#
#echo "remove old versions"
#rm -rf ./zws-test-cassandra3-standalone-*

if [ -d "./${STANDALONE_CASSANDRA_DIR}" ]; then
    echo "${STANDALONE_CASSANDRA_DIR} is existed, exit"
    exit
else
    echo "download and unpack ${STANDALONE_CASSANDRA_DIR}"
    mvn dependency:unpack -Dartifact="${STANDALONE_CASSANDRA_ARTIFACT}" -DoutputDirectory="./${STANDALONE_CASSANDRA_DIR}"
fi
